<%@ taglib prefix="c" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: YanYang
  Date: 2015/10/28
  Time: 21:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.* " %>
<%@ page import="java.lang.String" %>


<html>
<head>

    <title>TinyUrl服务</title>
    <style type="text/css">
        #normalUrl{
            width:300px;
        }
    </style>

     <% String tinyUrl = request.getParameter("tinyUrl"); %>

</head>

<body>
<div style="text-align:center">
    <div style="margin:100px auto">
        <p><strong>输入网址即可生成tinyurl</strong></p>
        <form id="TinyUrl" action="/tiny/" method="post" >
            <input id="normalUrl" type="text" name="url" placeholder="输入网址">
            <input id="produceTinyUrl" type="submit" value="生成TinyUrl" >
        </form>
        <%if (tinyUrl != null){%>
            <a href="http://<%=tinyUrl%>"><%=tinyUrl%></a>
        <%}%>
    </div>
</div>
</body>
</html>
